//
//  TSViewAutoFillViewController.m
//  MirkoLibTest
//
//  Created by Mirko on 2017/3/31.
//  Copyright © 2017年 Mirko. All rights reserved.
//

#import "TSViewAutoFillViewController.h"
#import "MCTextAutoFillService.h"


@interface TSViewAutoFillViewController () <MCTextAutoFillDelegate>

@property (nonatomic, strong) MCTextAutoFillService *service;

@end

@implementation TSViewAutoFillViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self addRightBttonAction:nil];
    
    self.service = [[MCTextAutoFillService alloc] init];
    
    [self.service addAutoFillItem:self rootView:self.view];
    // Do any additional setup after loading the view from its nib.
}

-(void) handleRightBtnAction:(UIButton *)button
{
    [self.service setValue:@"测试数据" index:11 controller:self];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(NSArray *) autoFillData:(UIViewController *) controller
{
    return [NSArray arrayWithObjects:@"1", @"2", @"3", @"4", nil];
}

-(void) dealloc
{
    NSLog(@"%s", __PRETTY_FUNCTION__);
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
